<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>广东国防教育学会</title>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" />
		<link rel="stylesheet" href="http://idangero.us/swiper/dist/css/swiper.min.css" />
		<link rel="stylesheet" href="/Public/Home/activity/css/style.css" />
	</head>
	<body>

<div class="bar bar-nav">
    <h1 class="title">专家详情</h1>
    <i class="icon icon-left" onclick="window.history.go(-1);"></i>
</div>

<nav class="bar bar-tab">
    <a class="tab-item active" href="<?php echo U('Index/index');?>">
        <span class="icon icon-home"></span>
        <span class="tab-label">首页</span>
    </a>
    <!--			<a class="tab-item" onclick="zixun();">
                                    <span class="icon iconfont icon-phone"></span>
                                    <span class="tab-label">咨询</span>
                            </a>-->
    <a class="tab-item open-indicator " href="<?php echo U('Users/index');?>">
        <span class="icon iconfont icon-account"></span>
        <span class="tab-label">我的</span>
    </a>
    <?php if($apply_count): ?><a class="tab-item" href="<?php echo U('Apply/expert_join');?>">
        <span class="icon iconfont icon-account"></span>
        <span class="tab-label">我要加入</span>
    </a><?php endif; ?>
</nav>

<div class="content">
    <div class="hotel_top clearfix expert_page">
        <div class="hotel_top_img">
            <img src="<?php echo ($apply_one['headimgurl']); ?>">
        </div>
        <div class="hotel_top_text">
            <h3><?php echo ($apply_one['user_name']); ?>&nbsp;&nbsp;<strong>
                    <?php switch($apply_one['type']): case "1": ?>军事专家<?php break;?>
                    <?php case "2": ?>国防专家<?php break;?>
                    <?php case "3": ?>医学专家<?php break; endswitch;?>
                </strong></h3>
            <p class="text_line3"><?php echo ($apply_one['signature']); ?><span>展开更多</span></p>
            <p>
                <!--<span>好评：<font><?php echo ($apply_one['praise_number']); ?></font></span>-->
                <span>访问：<font><?php echo ($apply_one['visit_number']); ?></font></span>
            </p>
        </div>
    </div>

    <div class="expert_page_list clearfix" id="expert_page_list">
        <div class="bd" style='height: 3rem;overflow: hidden;overflow-x: scroll;'>
            <ul style="height: 59px;width: 1100px;">
                <li class="col-33" style='width: 9%;margin-right: 1%;float: left;height: 100%;'><a target="_back" href="<?php echo ($apply_one['video_url']); ?>"><img style='width:100%;height: 100%;' src="/Public/Home/images/video.jpg" ></a></li>
                <?php if($apply_one['more_img_list']): if(is_array($apply_one['more_img_list'])): $i = 0; $__LIST__ = $apply_one['more_img_list'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$mm): $mod = ($i % 2 );++$i;?><li class="col-33" style='width: 8%;margin-right: 1%;float: left;height: 100%;'><a href="<?php echo ($mm); ?>"><img style='width:100%;height: 100%;' src="<?php echo ($mm); ?>" ></a></li><?php endforeach; endif; else: echo "" ;endif; endif; ?>

            </ul>
        </div>
        <?php if($yuyue_show): ?><a class="button button-fill" style="margin:1rem auto;height:1.8rem;line-height:1.8rem;background: #ccc">立即预约</a>
        <?php else: ?>
        <a class="button button-fill" onclick="yuyue()" style="margin:1rem auto;height:1.8rem;line-height:1.8rem;">立即预约</a><?php endif; ?>    
    </div>

    <div class="buttons-tab mechan-page-tab" style="margin-top:0px;">
        <a href="#tab1" class="tab-link active button">发布的活动</a>
        <a href="#tab2" class="tab-link button">评论</a>
        <a href="#tab3" class="tab-link button">专家介绍</a>
    </div>
    <div class="content-block row in_tab_list">
        <div class="tabs">
            <div id="tab1" class="tab in_hot_box activity_1 active">
                <div id="activity_apply">
                    <?php if(is_array($activity)): foreach($activity as $aa=>$activity): ?><div class="card demo-card-header-pic">
                        <a href="<?php echo U('ActivityDetail/index',array('activity_id'=>$activity['id'],'city'=>$activity['city']));?>">
                            <div valign="bottom" class="card-header color-white no-border no-padding">
                                <img class='card-cover' src="<?php echo ($activity['activity_img']); ?>" alt="">
                            </div>
                            <div class="card-content">
                                <div class="card-content-inner">
                                    <p class="hot_list_title"><?php echo ($activity['activity_name']); ?></p>
                                    <p class="color-gray">时间 <?php echo (date("Y/m/d",$activity['start_time'])); ?>~<?php echo (date("Y/m/d",$activity['end_time'])); ?></p>
                                    <p class="color-gray"><span><?php echo ($activity['area']); ?></span><span><?php echo ($activity['signup_number']); ?>人已报名</span><span>￥<?php echo ($activity['price']); ?></span></p>
                                </div>
                            </div>
                        </a>
                    </div><?php endforeach; endif; ?>
                </div>
                <?php if($activity_show): ?><div class="infinite-scroll-preloader" id="activity_quan" style="display:none;">
                    <div class="preloader"></div>
                </div>
                <p onclick="ajax_activity_submit();" class="activity_more" id="load_more"><span class="icon icon-down"></span> 点击加载更多...</p>
                <?php else: ?>
                <p id="load_more"> 暂无数据！</p><?php endif; ?>

            </div>
            <div id="tab2" class="tab in_hot_box activity_1">

                <div class="row discuss expert_discuss">
                    <div class="col-100">
                        <div class="content-padded">
                            <div class="sign_title content-block-title">评论（<?php echo ($count); ?>）</div>
                            <div class="list-block media-list">
                                <ul>
                                    <?php if(is_array($comment)): foreach($comment as $cc=>$comment): ?><li class="item-content">
                                        <div class="item-media" style='min-width: 60px;'>
                                            <img src="<?php echo ($comment['headimgurl']); ?>">
                                        </div>
                                        <div class="item-inner">
                                            <div class="item-title-row">
                                                <div class="item-title"><?php echo ($comment['user_name']); ?><span class="pull-right"><?php echo (date('Y-m-d',$comment['add_time'])); ?></span></div>
                                            </div>
                                            <div class="item-subtitle"><?php echo ($comment['content']); ?></div>
                                        </div>
                                    </li><?php endforeach; endif; ?>
                                </ul>
                                <?php if($comment_show): ?><div class="discuss_move text-center"><a href="<?php echo U('Apply/discuss_list',array('id'=>$id));?>">更多评论</a></div><?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="tab3" class="tab in_hot_box activity_1">
                <?php if($apply_one['introduce'] != ''): ?><div class="row discuss expert_discuss"  style="margin-bottom: 10px;">
                    <div class="col-100">
                        <div class="content-padded" style='font-size: 14px'>
                            <?php echo ($apply_one['introduce']); ?>
                        </div>
                    </div>
                </div>
                <?php else: ?>
                <p id="load_more"> 暂无简介！</p><?php endif; ?>
            </div>
        </div>
    </div>
</div>

<div class="activity_from_bg" style="display: none;"></div>
<div class="activity_from" style="display: none;">

    <form id="submitForm" onsubmit="return false;">
        <span class="close js-bm"><i class="iconfont icon-add"></i></span>
        <div class="list-block">
            <div class="item-title text-center">填写预约</div>
            <ul>
                <!-- Text inputs -->
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">姓名</div>
                            <div class="item-input">
                                <input type="text" placeholder="张三" name='username'>
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">手机</div>
                            <div class="item-input">
                                <input type="tel" placeholder="13456789101" name="phone">
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">地址</div>
                            <div class="item-input">
                                <input type="text" name="address"  placeholder='天河客运站'>
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">预约时间</div>
                            <div class="item-input">
                                <input type="tel" id="expert_time" name='select_time' placeholder='请选择时间'>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="content-block">
            <div class="row" style='margin-left: 0;'>
                <input name='pay' type="hidden" value='21'>
                <input name='id' type="hidden" value='<?php echo ($id); ?>'>
                <!--<div class="col-50"><span>合计：<font class="button-danger">￥21.00</font></span></div>-->
                <a href="javascript:void(0);" id="submitbutton" class="button button-big button-fill button-danger">提交</a>
            </div>
        </div>
    </form>
</div>


		<script type="text/javascript" src="http://g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
		<script type='text/javascript' src='http://g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
		<script type='text/javascript' src='http://g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
		<script src="http://idangero.us/swiper/dist/js/swiper.min.js"></script>
		<script type="text/javascript" src="/Public/Home/activity/js/huodon.js" ></script>
		<script>
			
			var swiper = new Swiper('.swiper-container', {
				pagination: '.swiper-pagination',
				paginationClickable: true,
				loop:true,    
				grabCursor: true,
				autoplay: 3000
			});
			
			 /* $(document).on('click','.open-preloader', function () {
				 Zepto.showPreloader('加载中...')
				    setTimeout(function () {
				    	 Zepto.hidePreloader();
				    }, 2000); 
			 }); */
			 $(document).on('click','.open-indicator', function () {
				 Zepto.showIndicator();
			     setTimeout(function () {
			    	Zepto.hideIndicator();
			     }, 2000);
			  });
		</script>
		

	</body>

</html>
<script src="/Public/Admin/plugins/layer/layer.js"></script>
<script>
			
                        Zepto("#expert_time").picker({
                          toolbarTemplate: '<header class="bar bar-nav">\
                          <button class="button button-link pull-right close-picker">确定</button>\
                          <h1 class="title">要预约的时间</h1>\
                          </header>',
                          cols: [
                            {
                              textAlign: 'center',
//			      values: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期日',]
                                values: [<?php echo ($make_one['select_time']); ?>]
                            }
                          ]
                        });
			
                        function yuyue(){
                                $(".activity_from").slideToggle();
                                $(".activity_from_bg").fadeToggle();
                        }
                        var swiper = new Swiper('.swiper-container', {
                                pagination: '.swiper-pagination',
                                paginationClickable: true
                        });
			
                        jQuery(document).ready(function(){
                                $(".text_line3 span").on("click",function(){
                                        $(this).parent().toggleClass("block");
					
                                        if ($(this).text() =='收缩') {
                                                $(this).text("展开更多")
                                        } else{
                                        $(this).text("收缩")
                                        }
                                })
                        })
                        
    $('#submitbutton').click(function(){
        $.ajax({
              url:"<?php echo U('Apply/expert_page_yuyue');?>",
            dataType: 'json',
            type:'post',
            data:$('#submitForm').serialize(),
            success:function(data){
                console.log(data);
                if(data.status == 1){
                    Zepto.confirm(data.message, '温馨提示',function(){
                        window.location.href="<?php echo U('Apply/expert_discuss');?>";
                    });
                    return false;
//                         layer.confirm(data.message,{btn:['确定'], icon:1, closeBtn: 2 },function(index){
//                            window.location.href="<?php echo U('Apply/expert_discuss');?>";
//                        });
                    
                }else if(data.status == 2){
//                    layer.msg(data.message,{time:2000,icon:2});
                    Zepto.toast(data.message, 2000, 'success top');
                    return false;
                }
            }
        });
    });
    
     var  page_stay = 1;
 /*** ajax 提交表单 查询国防列表结果*/  
 function ajax_activity_submit()
 {	 	 	 
                $("#activity_quan").show();
                page_stay += 1;
                $.ajax({
                        type : "GET",
                        //url:"/index.php?m=Mobile&c=User&a=collect_list&is_ajax=1&p="+page,//+tab,			
                        url:"/Apply/ajax_expert_page/is_ajax/1/p/"+page_stay,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
                        success: function(data)
                        {
                                $("#activity_quan").hide();
                                if($.trim(data) == ''){
                                        $('.activity_more').hide();
                                }else{
                                    $("#activity_apply").append(data);
                                }
                        }
                }); 
 } 
                      
    //咨询
    function zixun(){
        Zepto.confirm("蔡总：13456789123<br>李总：13456789456", '咨询电话','success top');
        return false;
    };
</script>

	

</html>